#ifndef _LABELHELPER_H_
#define _LABELHELPER_H_

#include "Graph.h"

class LabelHelper {
	int count;
	Graph& g;
	list<int> stack; // stack for vertex
	set<int> X;
	set<int>::iterator Xiter;
	int idx;

public:
	// constructor
	LabelHelper( Graph& graph );
	
	// functions
	void mergeStronglyCC();
	void reduceGraph();
	void getRoots( set<Vertex>& roots );

	void findSpanTree( set<Vertex>& roots );
	void dfsSpanTree( Vertex v );

	void assignIntervals( set<Vertex>& roots );
	void dfsInterval( Vertex v );

	void assignNonTree( set<Vertex>& roots );
	void dfsNonTree( Vertex v );

	void updateIntervalMap( map<int, int>& b2e );
};

#endif //_LABELHELPER_H_
